package net.pws.common.poi;

import org.apache.commons.lang.StringUtils;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;

public class TextOverrider implements CellOverrider {

	private String text;

	public void override(XWPFTableCell cell) {
		if (cell == null) {
			return;
		}
		cell.removeParagraph(0);
		if (StringUtils.isEmpty(text)) {
			cell.setText("");
		} else {
			cell.setText(text);
		}
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

}
